#include <stdio.h>
#include <string>

int main()
{
	std::string s1 = "Hello, ";
	std::string s2 = "world!\n";
	std::string s3 = s1 + s2;

	printf("%s\n", s3.c_str());
}

#if 0
/*
 * intel
 */
0000000000001269 <main>:
    1269:	f3 0f 1e fa          	endbr64 
    126d:	55                   	push   %rbp
    126e:	48 89 e5             	mov    %rsp,%rbp
    1271:	53                   	push   %rbx
    1272:	48 81 ec 88 00 00 00 	sub    $0x88,%rsp
    1279:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
    1280:	00 00 
    1282:	48 89 45 e8          	mov    %rax,-0x18(%rbp)
    1286:	31 c0                	xor    %eax,%eax
    1288:	48 8d 85 7f ff ff ff 	lea    -0x81(%rbp),%rax
    128f:	48 89 c7             	mov    %rax,%rdi
    1292:	e8 c9 fe ff ff       	callq  1160 <_ZNSaIcEC1Ev@plt>
    1297:	48 8d 95 7f ff ff ff 	lea    -0x81(%rbp),%rdx
    129e:	48 8d 45 80          	lea    -0x80(%rbp),%rax
    12a2:	48 8d 35 5c 0d 00 00 	lea    0xd5c(%rip),%rsi        # 2005 <_ZStL19piecewise_construct+0x1>
    12a9:	48 89 c7             	mov    %rax,%rdi
    12ac:	e8 7f fe ff ff       	callq  1130 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_@plt>
    12b1:	48 8d 85 7f ff ff ff 	lea    -0x81(%rbp),%rax
    12b8:	48 89 c7             	mov    %rax,%rdi
    12bb:	e8 50 fe ff ff       	callq  1110 <_ZNSaIcED1Ev@plt>
    12c0:	48 8d 85 7f ff ff ff 	lea    -0x81(%rbp),%rax
    12c7:	48 89 c7             	mov    %rax,%rdi
    12ca:	e8 91 fe ff ff       	callq  1160 <_ZNSaIcEC1Ev@plt>
    12cf:	48 8d 95 7f ff ff ff 	lea    -0x81(%rbp),%rdx
    12d6:	48 8d 45 a0          	lea    -0x60(%rbp),%rax
    12da:	48 8d 35 2c 0d 00 00 	lea    0xd2c(%rip),%rsi        # 200d <_ZStL19piecewise_construct+0x9>
    12e1:	48 89 c7             	mov    %rax,%rdi
    12e4:	e8 47 fe ff ff       	callq  1130 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_@plt>
    12e9:	48 8d 85 7f ff ff ff 	lea    -0x81(%rbp),%rax
    12f0:	48 89 c7             	mov    %rax,%rdi
    12f3:	e8 18 fe ff ff       	callq  1110 <_ZNSaIcED1Ev@plt>
    12f8:	48 8d 45 c0          	lea    -0x40(%rbp),%rax
    12fc:	48 8d 55 a0          	lea    -0x60(%rbp),%rdx
    1300:	48 8d 4d 80          	lea    -0x80(%rbp),%rcx
    1304:	48 89 ce             	mov    %rcx,%rsi
    1307:	48 89 c7             	mov    %rax,%rdi
    130a:	e8 d5 00 00 00       	callq  13e4 <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_>
    130f:	48 8d 45 c0          	lea    -0x40(%rbp),%rax
    1313:	48 89 c7             	mov    %rax,%rdi
    1316:	e8 c5 fd ff ff       	callq  10e0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv@plt>
    131b:	48 89 c7             	mov    %rax,%rdi
    131e:	e8 1d fe ff ff       	callq  1140 <puts@plt>
    1323:	48 8d 45 c0          	lea    -0x40(%rbp),%rax
    1327:	48 89 c7             	mov    %rax,%rdi
    132a:	e8 d1 fd ff ff       	callq  1100 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
    132f:	48 8d 45 a0          	lea    -0x60(%rbp),%rax
    1333:	48 89 c7             	mov    %rax,%rdi
    1336:	e8 c5 fd ff ff       	callq  1100 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
    133b:	48 8d 45 80          	lea    -0x80(%rbp),%rax
    133f:	48 89 c7             	mov    %rax,%rdi
    1342:	e8 b9 fd ff ff       	callq  1100 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
    1347:	b8 00 00 00 00       	mov    $0x0,%eax
    134c:	48 8b 4d e8          	mov    -0x18(%rbp),%rcx
    1350:	64 48 33 0c 25 28 00 	xor    %fs:0x28,%rcx
    1357:	00 00 
    1359:	74 7f                	je     13da <main+0x171>
    135b:	eb 78                	jmp    13d5 <main+0x16c>
    135d:	f3 0f 1e fa          	endbr64 
    1361:	48 89 c3             	mov    %rax,%rbx
    1364:	48 8d 85 7f ff ff ff 	lea    -0x81(%rbp),%rax
    136b:	48 89 c7             	mov    %rax,%rdi
    136e:	e8 9d fd ff ff       	callq  1110 <_ZNSaIcED1Ev@plt>
    1373:	48 89 d8             	mov    %rbx,%rax
    1376:	48 89 c7             	mov    %rax,%rdi
    1379:	e8 d2 fd ff ff       	callq  1150 <_Unwind_Resume@plt>
    137e:	f3 0f 1e fa          	endbr64 
    1382:	48 89 c3             	mov    %rax,%rbx
    1385:	48 8d 85 7f ff ff ff 	lea    -0x81(%rbp),%rax
    138c:	48 89 c7             	mov    %rax,%rdi
    138f:	e8 7c fd ff ff       	callq  1110 <_ZNSaIcED1Ev@plt>
    1394:	eb 28                	jmp    13be <main+0x155>
    1396:	f3 0f 1e fa          	endbr64 
    139a:	48 89 c3             	mov    %rax,%rbx
    139d:	48 8d 45 c0          	lea    -0x40(%rbp),%rax
    13a1:	48 89 c7             	mov    %rax,%rdi
    13a4:	e8 57 fd ff ff       	callq  1100 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
    13a9:	eb 07                	jmp    13b2 <main+0x149>
    13ab:	f3 0f 1e fa          	endbr64 
    13af:	48 89 c3             	mov    %rax,%rbx
    13b2:	48 8d 45 a0          	lea    -0x60(%rbp),%rax
    13b6:	48 89 c7             	mov    %rax,%rdi
    13b9:	e8 42 fd ff ff       	callq  1100 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
    13be:	48 8d 45 80          	lea    -0x80(%rbp),%rax
    13c2:	48 89 c7             	mov    %rax,%rdi
    13c5:	e8 36 fd ff ff       	callq  1100 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
    13ca:	48 89 d8             	mov    %rbx,%rax
    13cd:	48 89 c7             	mov    %rax,%rdi
    13d0:	e8 7b fd ff ff       	callq  1150 <_Unwind_Resume@plt>
    13d5:	e8 46 fd ff ff       	callq  1120 <__stack_chk_fail@plt>
    13da:	48 81 c4 88 00 00 00 	add    $0x88,%rsp
    13e1:	5b                   	pop    %rbx
    13e2:	5d                   	pop    %rbp
    13e3:	c3                   	retq   

/*
 * arm
 */
0000000000400b1c <main>:
  400b1c:	a9b77bfd 	stp	x29, x30, [sp, #-144]!
  400b20:	910003fd 	mov	x29, sp
  400b24:	f9000bf3 	str	x19, [sp, #16]
  400b28:	910203a0 	add	x0, x29, #0x80
  400b2c:	97ffffb1 	bl	4009f0 <_ZNSaIcEC1Ev@plt>
  400b30:	910203a2 	add	x2, x29, #0x80
  400b34:	90000000 	adrp	x0, 400000 <_init-0x910>
  400b38:	91348001 	add	x1, x0, #0xd20
  400b3c:	910183a0 	add	x0, x29, #0x60
  400b40:	97ffffa8 	bl	4009e0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_@plt>
  400b44:	910203a0 	add	x0, x29, #0x80
  400b48:	97ffff96 	bl	4009a0 <_ZNSaIcED1Ev@plt>
  400b4c:	910223a0 	add	x0, x29, #0x88
  400b50:	97ffffa8 	bl	4009f0 <_ZNSaIcEC1Ev@plt>
  400b54:	910223a2 	add	x2, x29, #0x88
  400b58:	90000000 	adrp	x0, 400000 <_init-0x910>
  400b5c:	9134a001 	add	x1, x0, #0xd28
  400b60:	910103a0 	add	x0, x29, #0x40
  400b64:	97ffff9f 	bl	4009e0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_@plt>
  400b68:	910223a0 	add	x0, x29, #0x88
  400b6c:	97ffff8d 	bl	4009a0 <_ZNSaIcED1Ev@plt>
  400b70:	910103a1 	add	x1, x29, #0x40
  400b74:	910183a0 	add	x0, x29, #0x60
  400b78:	910083a2 	add	x2, x29, #0x20
  400b7c:	aa0203e8 	mov	x8, x2
  400b80:	94000023 	bl	400c0c <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_>
  400b84:	910083a0 	add	x0, x29, #0x20
  400b88:	97ffff8a 	bl	4009b0 <_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv@plt>
  400b8c:	97ffff8d 	bl	4009c0 <puts@plt>
  400b90:	910083a0 	add	x0, x29, #0x20
  400b94:	97ffff77 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400b98:	910103a0 	add	x0, x29, #0x40
  400b9c:	97ffff75 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400ba0:	910183a0 	add	x0, x29, #0x60
  400ba4:	97ffff73 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400ba8:	52800000 	mov	w0, #0x0                   	// #0
  400bac:	14000015 	b	400c00 <main+0xe4>
  400bb0:	aa0003f3 	mov	x19, x0
  400bb4:	910203a0 	add	x0, x29, #0x80
  400bb8:	97ffff7a 	bl	4009a0 <_ZNSaIcED1Ev@plt>
  400bbc:	aa1303e0 	mov	x0, x19
  400bc0:	97ffff94 	bl	400a10 <_Unwind_Resume@plt>
  400bc4:	aa0003f3 	mov	x19, x0
  400bc8:	910223a0 	add	x0, x29, #0x88
  400bcc:	97ffff75 	bl	4009a0 <_ZNSaIcED1Ev@plt>
  400bd0:	14000008 	b	400bf0 <main+0xd4>
  400bd4:	aa0003f3 	mov	x19, x0
  400bd8:	910083a0 	add	x0, x29, #0x20
  400bdc:	97ffff65 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400be0:	14000002 	b	400be8 <main+0xcc>
  400be4:	aa0003f3 	mov	x19, x0
  400be8:	910103a0 	add	x0, x29, #0x40
  400bec:	97ffff61 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400bf0:	910183a0 	add	x0, x29, #0x60
  400bf4:	97ffff5f 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400bf8:	aa1303e0 	mov	x0, x19
  400bfc:	97ffff85 	bl	400a10 <_Unwind_Resume@plt>
  400c00:	f9400bf3 	ldr	x19, [sp, #16]
  400c04:	a8c97bfd 	ldp	x29, x30, [sp], #144
  400c08:	d65f03c0 	ret

0000000000400c0c <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_>:
  400c0c:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  400c10:	910003fd 	mov	x29, sp
  400c14:	a90153f3 	stp	x19, x20, [sp, #16]
  400c18:	aa0803f3 	mov	x19, x8
  400c1c:	f90017a0 	str	x0, [x29, #40]
  400c20:	f90013a1 	str	x1, [x29, #32]
  400c24:	f94017a1 	ldr	x1, [x29, #40]
  400c28:	aa1303e0 	mov	x0, x19
  400c2c:	97ffff69 	bl	4009d0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@plt>
  400c30:	f94013a1 	ldr	x1, [x29, #32]
  400c34:	aa1303e0 	mov	x0, x19
  400c38:	97ffff56 	bl	400990 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_@plt>
  400c3c:	14000006 	b	400c54 <_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_+0x48>
  400c40:	aa0003f4 	mov	x20, x0
  400c44:	aa1303e0 	mov	x0, x19
  400c48:	97ffff4a 	bl	400970 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
  400c4c:	aa1403e0 	mov	x0, x20
  400c50:	97ffff70 	bl	400a10 <_Unwind_Resume@plt>
  400c54:	aa1303e0 	mov	x0, x19
  400c58:	a94153f3 	ldp	x19, x20, [sp, #16]
  400c5c:	a8c37bfd 	ldp	x29, x30, [sp], #48
  400c60:	d65f03c0 	ret
  400c64:	00000000 	.inst	0x00000000 ; undefined


#endif

